﻿using static System.Console;
using System;

namespace _05_Ex01
{
    class Program
    {
        static void Main(string[] args)
        {
            short shortResult, shortVal = 4;
            int integerVal = 67;
            long longResult;
            float floatVal = 10.5f;
            double doubleResult, doubleVal = 99.999d;
            string stringReslut, stringVal = "17";
            bool boolVal = true;
            WriteLine("Variable Conversion Examples\n");
            doubleResult = floatVal * shortVal;
            WriteLine($"Implicit, -> double: {floatVal} * {shortVal} -> {doubleResult}");
            shortResult = (short)floatVal;
            WriteLine($"Explicit, -> short: {floatVal} -> {shortVal}");
            stringReslut = Convert.ToString(boolVal) + Convert.ToString(doubleVal);

            WriteLine($"Explicit, -> string: \"{boolVal}\" + \"{doubleVal}\" -> " +
                $"{stringReslut} ");

            longResult = integerVal + Convert.ToInt64(stringVal);
            WriteLine($"Mixed, -> long: {integerVal} + {stringVal} -> {longResult}");
            ReadKey();
        }
    }
}
